﻿using IGrain;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace Grains
{
    public class BasicGrain : Orleans.Grain, IBasic
    {
        public Task<string> DelayMsg(string msg)
        {
            Thread.Sleep(5 * 1000);
            Console.WriteLine($"{DateTime.Now.ToString("HH:mm:ss.fff")} - {msg} - Delay 3s...");
           
            return Task.FromResult($"DelayMsg Done.");
        }

        public Task<string> SayHello(string msg)
        {
            Console.WriteLine($"{DateTime.Now.ToString("HH:mm:ss.fff")} - {msg}");
            return Task.FromResult<string>("SayHello Done");
        }
    }
}
